<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>电商首页</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: Arial, sans-serif;
        }

        /* 导航栏 */
        .navbar {
            background-color: #333;
            padding: 1rem;
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .nav-links a {
            color: white;
            text-decoration: none;
            margin-left: 2rem;
        }

        /* 商品展示 */
        .products {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2rem;
            padding: 2rem;
        }

        .product-card {
            border: 1px solid #ddd;
            padding: 1rem;
            text-align: center;
        }

        .product-card img {
            max-width: 100%;
            height: 200px;
            object-fit: cover;
        }

        .price {
            color: #e44d26;
            font-size: 1.2rem;
            margin: 1rem 0;
        }

        .btn {
            background-color: #007bff;
            color: white;
            padding: 0.5rem 1rem;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        /* 页脚 */
        footer {
            background-color: #333;
            color: white;
            text-align: center;
            padding: 1rem;
            position: fixed;
            bottom: 0;
            width: 100%;
        }
    </style>
</head>
<body>
    <nav class="navbar">
        <h2>电商平台</h2>
        <div class="nav-links">
            <a href="#home">首页</a>
            <a href="#products">商品</a>
            <a href="/login.html">登录</a>
            <a href="/register.html">注册</a>
        </div>
    </nav>

    <div class="products">
        <div class="product-card">
            <img src="product1.jpg" alt="商品1">
            <h3>商品名称1</h3>
            <p class="price">￥199.00</p>
            <button class="btn">加入购物车</button>
        </div>
        <!-- 更多商品卡片... -->
    </div>

    <footer>
        <p>&copy; 2023 电商平台 版权所有</p>
    </footer>
</body>
</html>